home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / System Extras Headers / AOCE Headers / OCE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-20  |  54.3 KB  |  1,685 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        OCE.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. /*     SECOND WARNING: 
  13.     This file has actually been hand-modified to restore comments. If you
  14.     re-generate it, please restore the comments!!!
  15. */
  16.  
  17. #ifndef    __OCE__
  18. #define __OCE__
  19.  
  20. #ifndef    REZ
  21. #ifndef __ALIASES__
  22. #include <Aliases.h>
  23. /*    #include <Types.h>                                            */
  24. /*        #include <ConditionalMacros.h>                            */
  25. /*        #include <MixedMode.h>                                    */
  26. /*            #include <Traps.h>                                    */
  27. /*    #include <AppleTalk.h>                                        */
  28. /*        #include <OSUtils.h>                                    */
  29. /*    #include <Files.h>                                            */
  30. /*        #include <SegLoad.h>                                    */
  31. #endif
  32.  
  33. #ifndef __APPLEEVENTS__
  34. #include <AppleEvents.h>
  35. /*    #include <Memory.h>                                            */
  36. /*    #include <Events.h>                                            */
  37. /*        #include <Quickdraw.h>                                    */
  38. /*            #include <QuickdrawText.h>                            */
  39. /*                #include <IntlResources.h>                        */
  40. /*    #include <EPPC.h>                                            */
  41. /*        #include <PPCToolBox.h>                                    */
  42. /*        #include <Processes.h>                                    */
  43. /*    #include <Notification.h>                                    */
  44. #endif
  45.  
  46. #ifndef __SCRIPT__
  47. #include <Script.h>
  48. #endif
  49.  
  50. #ifndef __TYPES__
  51. #endif
  52.  
  53. /*
  54. All utility routines defined here are callable at interrupt level.
  55. */
  56.  
  57.  
  58. /*
  59. Defines for the trap selector values.  
  60.  
  61. Note:  Some selector values also chosen from this same range of numbers appear
  62. in the file OCEMessaging.h.  Check there before you add a new value.
  63. */
  64.  
  65. #ifdef __ADASTYPES_IMPLEMENTATION
  66. #define __OCEUtils(selector)
  67. #else
  68. #define __OCEUtils(selector) = { 0x303C, selector, 0xAA5C }
  69. #endif
  70.  
  71. #define kOCECopyCreationID 768
  72. #define kOCECopyDirDiscriminator 769
  73. #define kOCECopyLocalRecordID 770
  74. #define kOCECopyPackedDSSpec 771
  75. #define kOCECopyPackedPathName 772
  76. #define kOCECopyPackedRLI 773
  77. #define kOCECopyPackedRecordID 774
  78. #define kOCECopyRLI 775
  79. #define kOCECopyRString 776
  80. #define kOCECopyRecordID 777
  81. #define kOCECopyShortRecordID 778
  82. #define kOCEDuplicateRLI 779
  83. #define kOCEEqualCreationID 780
  84. #define kOCEEqualDirDiscriminator 781
  85. #define kOCEEqualDSSpec 782
  86. #define kOCEEqualLocalRecordID 783
  87. #define kOCEEqualPackedDSSpec 784
  88. #define kOCEEqualPackedPathName 785
  89. #define kOCEEqualPackedRecordID 786
  90. #define kOCEEqualPackedRLI 787
  91. #define kOCEEqualRecordID 788
  92. #define kOCEEqualRLI 789
  93. #define kOCEEqualRString 790
  94. #define kOCEEqualShortRecordID 791
  95. #define kOCEExtractAlias 792
  96. #define kOCEGetDSSpecInfo 793
  97. #define kOCEGetIndAttributeType 794
  98. #define kOCEGetIndRecordType 795
  99. #define kOCEGetXtnType 796
  100. #define kOCEIsNullPackedPathName 797
  101. #define kOCENewLocalRecordID 798
  102. #define kOCENewRLI 799
  103. #define kOCENewRecordID 800
  104. #define kOCENewShortRecordID 801
  105. #define kOCEPackDSSpec 802
  106. #define kOCEPackPathName 803
  107. #define kOCEPackRLI 804
  108. #define kOCEPackRLIParts 805
  109. #define kOCEPackRecordID 806
  110. #define kOCEPackedDSSpecSize 807
  111. #define kOCEPackedPathNameSize 808
  112. #define kOCEPackedRLIPartsSize 809
  113. #define kOCEPackedRLISize 810
  114. #define kOCEPackedRecordIDSize 811
  115. #define kOCEDNodeNameCount 812
  116. #define kOCERelRString 813
  117. #define kOCESetCreationIDtoNull 814
  118. #define kOCEUnpackDSSpec 815
  119. #define kOCEUnpackPathName 816
  120. #define kOCEUnpackRLI 817
  121. #define kOCEUnpackRecordID 818
  122. #define kOCEValidPackedDSSpec 819
  123. #define kOCEValidPackedPathName 820
  124. #define kOCEValidPackedRecordID 821
  125. #define kOCEValidPackedRLI 822
  126. #define kOCEValidRLI 823
  127. #define kOCEValidRString 824
  128. #define kOCECToRString 825
  129. #define kOCEPToRString 826
  130. #define kOCERToPString 827
  131. #define kOCEPathFinderCID 828
  132. #define kOCEStreamPackedDSSpec 829
  133.  
  134. #define kOCENullCID 836
  135. #define kOCEGetAccessControlDSSpec 837
  136. #define kOCEGetRootPackedRLI 838
  137.  
  138. /* Miscellaneous defines:  (these cannot be made into enums) */
  139. #define kMinPackedRStringLength (sizeof (ProtoRString))
  140.  
  141. #define kMinPackedRLISize (sizeof (ProtoPackedRLI) + \
  142.     sizeof (DirDiscriminator) + sizeof (DNodeNum) + \
  143.     kMinPackedRStringLength + sizeof (ProtoPackedPathName))
  144.  
  145. #define kRLIMaxBytes (sizeof (RString) + sizeof (DirDiscriminator) +  \
  146.     sizeof (DNodeNum) + kPathNameMaxBytes)
  147.  
  148. #define kPackedRecordIDMaxBytes (kPathNameMaxBytes + sizeof (DNodeNum) +  \
  149.     sizeof (DirDiscriminator) + sizeof (CreationID) + (3 * sizeof (RString)))
  150.  
  151. #define kPackedDSSpecMaxBytes (sizeof (PackedRecordID) + sizeof (OSType) +  \
  152.     sizeof (unsigned short))
  153.  
  154. typedef unsigned short OCERecordTypeIndex;
  155. typedef unsigned short OCEAttributeTypeIndex;
  156.  
  157. #endif
  158.  
  159. /*
  160. All these standard definitions begin with the Apple symbol (not shown here).
  161.  
  162. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  163. with the proper index.  These routines return pointers to the standard type.
  164. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  165. use global data can also use these.
  166. */
  167.  
  168. /* Indices for the standard definitions for certain record types (OCERecordTypeIndex): */
  169.  
  170. #define        kUserRecTypeNum             1        /* "User" */
  171. #define        kGroupRecTypeNum            2        /* "Group" */
  172. #define        kMnMRecTypeNum                3        /* "AppleMail™ M&M" */
  173. #define        kMnMForwarderRecTypeNum        4        /* "AppleMail™ Fwdr" */
  174. #define        kNetworkSpecRecTypeNum        5        /* "NetworkSpec" */
  175. #define        kADAPServerRecTypeNum        6        /* "ADAP Server" */
  176. #define        kADAPDNodeRecTypeNum        7        /* "ADAP DNode" */
  177. #define        kADAPDNodeRepRecTypeNum        8        /* "ADAP DNode Rep" */
  178. #define        kServerSetupRecTypeNum        9        /* "Server Setup" */
  179. #define        kDirectoryRecTypeNum        10        /* "Directory" */
  180. #define        kDNodeRecTypeNum            11        /* "DNode" */
  181. #define        kSetupRecTypeNum            12        /* "Setup" */
  182. #define        kMSAMRecTypeNum                13        /* "MSAM" */
  183. #define        kDSAMRecTypeNum                14        /* "DSAM" */
  184. #define        kAttributeValueRecTypeNum    15        /* "Attribute Value" */
  185. #define        kBusinessCardRecTypeNum        16        /* "Business Card" */
  186. #define        kMailServiceRecTypeNum        17        /* "Mail Service" */
  187. #define        kCombinedRecTypeNum            18        /* "Combined" */
  188. #define        kOtherServiceRecTypeNum        19        /* "Other Service" */
  189. #define        kAFPServiceRecTypeNum        20        /* "Other Service afps" */
  190.  
  191. #define        kFirstOCERecTypeNum    kUserRecTypeNum            /* first standard OCE record type */
  192. #define        kLastOCERecTypeNum    kAFPServiceRecTypeNum    /* last standard OCE record type */
  193. #define        kNumOCERecTypes        (kLastOCERecTypeNum - kFirstOCERecTypeNum + 1)
  194.  
  195. /* Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): */
  196.  
  197. #define        kMemberAttrTypeNum            1001    /* "Member" */
  198. #define        kAdminsAttrTypeNum            1002    /* "Administrators" */
  199. #define        kMailSlotsAttrTypeNum        1003    /* "mailslots" */
  200. #define        kPrefMailAttrTypeNum        1004    /* "pref mailslot" */
  201. #define        kAddressAttrTypeNum            1005    /* "Address" */
  202. #define        kPictureAttrTypeNum            1006    /* "Picture" */
  203. #define        kAuthKeyAttrTypeNum            1007    /* "auth key" */
  204. #define        kTelephoneAttrTypeNum        1008    /* "Telephone" */
  205. #define        kNBPNameAttrTypeNum            1009    /* "NBP Name" */
  206. #define        kQMappingAttrTypeNum        1010    /* "ForwarderQMap" */
  207. #define        kDialupSlotAttrTypeNum        1011    /* "DialupSlotInfo" */
  208. #define        kHomeNetAttrTypeNum            1012    /* "Home Internet" */
  209. #define        kCoResAttrTypeNum            1013    /* "Co-resident M&M" */
  210. #define        kFwdrLocalAttrTypeNum        1014    /* "FwdrLocalRecord" */
  211. #define        kConnectAttrTypeNum            1015    /* "Connected To" */
  212. #define        kForeignAttrTypeNum            1016    /* "Foreign RLIs" */
  213. #define        kOwnersAttrTypeNum            1017    /* "Owners" */
  214. #define        kReadListAttrTypeNum        1018    /* "ReadList" */
  215. #define        kWriteListAttrTypeNum        1019    /* "WriteList" */
  216. #define        kDescriptorAttrTypeNum        1020    /* "Descriptor" */
  217. #define        kCertificateAttrTypeNum        1021    /* "Certificate" */
  218. #define        kMsgQsAttrTypeNum            1022    /* "MessageQs" */
  219. #define        kPrefMsgQAttrTypeNum        1023    /* "PrefMessageQ" */
  220. #define        kMasterPFAttrTypeNum        1024    /* "MasterPF" */
  221. #define        kMasterNetSpecAttrTypeNum    1025    /* "MasterNetSpec" */
  222. #define        kServersOfAttrTypeNum        1026    /* "Servers Of" */
  223. #define        kParentCIDAttrTypeNum        1027    /* "Parent CID" */
  224. #define        kNetworkSpecAttrTypeNum        1028    /* "NetworkSpec" */
  225. #define        kLocationAttrTypeNum        1029    /* "Location" */
  226. #define        kTimeSvrTypeAttrTypeNum        1030    /* "TimeServer Type" */
  227. #define        kUpdateTimerAttrTypeNum        1031    /* "Update Timer" */
  228. #define        kShadowsOfAttrTypeNum        1032    /* "Shadows Of" */
  229. #define        kShadowServerAttrTypeNum    1033    /* "Shadow Server" */
  230. #define        kTBSetupAttrTypeNum            1034    /* "TB Setup" */
  231. #define        kMailSetupAttrTypeNum        1035    /* "Mail Setup" */
  232. #define        kSlotIDAttrTypeNum            1036    /* "SlotID" */
  233. #define        kGatewayFileIDAttrTypeNum    1037    /* "Gateway FileID" */
  234. #define        kMailServiceAttrTypeNum        1038    /* "Mail Service" */
  235. #define        kStdSlotInfoAttrTypeNum        1039    /* "Std Slot Info" */
  236. #define        kAssoDirectoryAttrTypeNum    1040    /* "Asso. Directory" */
  237. #define        kDirectoryAttrTypeNum        1041    /* "Directory" */
  238. #define        kDirectoriesAttrTypeNum        1042    /* "Directories" */
  239. #define        kSFlagsAttrTypeNum            1043    /* "SFlags" */
  240. #define        kLocalNameAttrTypeNum        1044    /* "Local Name" */
  241. #define        kLocalKeyAttrTypeNum        1045    /* "Local Key" */
  242. #define        kDirUserRIDAttrTypeNum        1046    /* "Dir User RID" */
  243. #define        kDirUserKeyAttrTypeNum        1047    /* "Dir User Key" */
  244. #define        kDirNativeNameAttrTypeNum    1048    /* "Dir Native Name" */
  245. #define        kCommentAttrTypeNum            1049    /* "Comment" */
  246. #define        kRealNameAttrTypeNum        1050    /* "Real Name" */
  247. #define        kPrivateDataAttrTypeNum        1051    /* "Private Data" */
  248. #define        kDirTypeAttrTypeNum            1052    /* "Directory Type" */
  249. #define        kDSAMFileAliasAttrTypeNum    1053    /* "DSAM File Alias" */
  250. #define        kCanAddressToAttrTypeNum    1054    /* "Can Address To" */
  251. #define        kDiscriminatorAttrTypeNum    1055    /* "Discriminator" */
  252. #define        kAliasAttrTypeNum            1056    /* "Alias" */
  253. #define        kParentMSAMAttrTypeNum        1057    /* "Parent MSAM" */
  254. #define        kParentDSAMAttrTypeNum        1058    /* "Parent DSAM" */
  255. #define        kSlotAttrTypeNum            1059    /* "Slot" */
  256. #define        kAssoMailServiceAttrTypeNum    1060    /* "Asso. Mail Service" */
  257. #define        kFakeAttrTypeNum            1061    /* "Fake" */
  258. #define        kInheritSysAdminAttrTypeNum    1062    /* "Inherit SysAdministrators" */
  259. #define        kPreferredPDAttrTypeNum        1063    /* "Preferred PD" */
  260. #define        kLastLoginAttrTypeNum        1064    /* "Last Login" */
  261. #define        kMailerAOMStateAttrTypeNum    1065    /* "Mailer AOM State" */
  262. #define        kMailerSendOptionsAttrTypeNum 1066    /* "Mailer Send Options" */
  263. #define        kJoinedAttrTypeNum            1067    /* "Joined" */
  264. #define        kUnconfiguredAttrTypeNum    1068    /* "Unconfigured" */
  265. #define        kVersionAttrTypeNum            1069    /* "Version" */
  266. #define        kLocationNamesAttrTypeNum    1070    /* "Location Names" */
  267. #define        kActiveAttrTypeNum            1071    /* "Active" */
  268. #define        kDeleteRequestedAttrTypeNum    1072    /* "Delete Requested" */
  269. #define        kGatewayTypeAttrTypeNum        1073    /* "Gateway Type" */
  270.  
  271. #define        kFirstOCEAttrTypeNum    kMemberAttrTypeNum    /* first standard OCE attr type */
  272. #define        kLastOCEAttrTypeNum        kGatewayTypeAttrTypeNum    /* last standard OCE attr type */
  273. #define        kNumOCEAttrTypes        (kLastOCEAttrTypeNum - kFirstOCEAttrTypeNum + 1)
  274.  
  275.  
  276. /* For anyone who absolutely needs a define of the body of the standard record or
  277. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  278. in character set 'smRoman'.  If you try to compare these to some RString or
  279. AttributeType variable, you must take the character set code into account.  Future
  280. standard types may be defined using character sets other than 'smRoman'.
  281. */
  282.  
  283. /* Standard definitions for certain record types: */
  284.  
  285. #define        kUserRecTypeBody             "aoce User"
  286. #define        kGroupRecTypeBody            "aoce Group"
  287. #define        kMnMRecTypeBody                "aoce AppleMail™ M&M"
  288. #define        kMnMForwarderRecTypeBody    "aoce AppleMail™ Fwdr"
  289. #define        kNetworkSpecRecTypeBody        "aoce NetworkSpec"
  290. #define        kADAPServerRecTypeBody        "aoce ADAP Server"
  291. #define        kADAPDNodeRecTypeBody        "aoce ADAP DNode"
  292. #define        kADAPDNodeRepRecTypeBody    "aoce ADAP DNode Rep"
  293. #define        kServerSetupRecTypeBody        "aoce Server Setup"
  294. #define        kDirectoryRecTypeBody        "aoce Directory"
  295. #define        kDNodeRecTypeBody            "aoce DNode"
  296. #define        kSetupRecTypeBody            "aoce Setup"
  297. #define        kMSAMRecTypeBody            "aoce MSAM"
  298. #define        kDSAMRecTypeBody            "aoce DSAM"
  299. #define        kAttributeValueRecTypeBody    "aoce Attribute Value"
  300. #define        kBusinessCardRecTypeBody    "aoce Business Card"
  301. #define        kMailServiceRecTypeBody        "aoce Mail Service"
  302. #define        kCombinedRecTypeBody        "aoce Combined"
  303. #define        kOtherServiceRecTypeBody    "aoce Other Service"
  304. #define        kAFPServiceRecTypeBody        "aoce Other Service afps"
  305.  
  306. /* Standard definitions for certain attribute types: */
  307.  
  308. #define        kMemberAttrTypeBody            "aoce Member"
  309. #define        kAdminsAttrTypeBody            "aoce Administrators"
  310. #define        kMailSlotsAttrTypeBody        "aoce mailslots"
  311. #define        kPrefMailAttrTypeBody        "aoce pref mailslot"
  312. #define        kAddressAttrTypeBody        "aoce Address"
  313. #define        kPictureAttrTypeBody        "aoce Picture"
  314. #define        kAuthKeyAttrTypeBody        "aoce auth key"
  315. #define        kTelephoneAttrTypeBody        "aoce Telephone"
  316. #define        kNBPNameAttrTypeBody        "aoce NBP Name"
  317. #define        kQMappingAttrTypeBody        "aoce ForwarderQMap"
  318. #define        kDialupSlotAttrTypeBody        "aoce DialupSlotInfo"
  319. #define        kHomeNetAttrTypeBody        "aoce Home Internet"
  320. #define        kCoResAttrTypeBody            "aoce Co-resident M&M"
  321. #define        kFwdrLocalAttrTypeBody        "aoce FwdrLocalRecord"
  322. #define        kConnectAttrTypeBody        "aoce Connected To"
  323. #define        kForeignAttrTypeBody        "aoce Foreign RLIs"
  324. #define        kOwnersAttrTypeBody            "aoce Owners"
  325. #define        kReadListAttrTypeBody        "aoce ReadList"
  326. #define        kWriteListAttrTypeBody        "aoce WriteList"
  327. #define        kDescriptorAttrTypeBody        "aoce Descriptor"
  328. #define        kCertificateAttrTypeBody    "aoce Certificate"
  329. #define        kMsgQsAttrTypeBody            "aoce MessageQs"
  330. #define        kPrefMsgQAttrTypeBody        "aoce PrefMessageQ"
  331. #define        kMasterPFAttrTypeBody        "aoce MasterPF"
  332. #define        kMasterNetSpecAttrTypeBody    "aoce MasterNetSpec"
  333. #define        kServersOfAttrTypeBody        "aoce Servers Of"
  334. #define        kParentCIDAttrTypeBody        "aoce Parent CID"
  335. #define        kNetworkSpecAttrTypeBody    "aoce NetworkSpec"
  336. #define        kLocationAttrTypeBody        "aoce Location"
  337. #define        kTimeSvrTypeAttrTypeBody    "aoce TimeServer Type"
  338. #define        kUpdateTimerAttrTypeBody    "aoce Update Timer"
  339. #define        kShadowsOfAttrTypeBody        "aoce Shadows Of"
  340. #define        kShadowServerAttrTypeBody    "aoce Shadow Server"
  341. #define        kTBSetupAttrTypeBody        "aoce TB Setup"
  342. #define        kMailSetupAttrTypeBody        "aoce Mail Setup"
  343. #define        kSlotIDAttrTypeBody            "aoce SlotID"
  344. #define        kGatewayFileIDAttrTypeBody    "aoce Gateway FileID"
  345. #define        kMailServiceAttrTypeBody    "aoce Mail Service"
  346. #define        kStdSlotInfoAttrTypeBody    "aoce Std Slot Info"
  347. #define        kAssoDirectoryAttrTypeBody    "aoce Asso. Directory"
  348. #define        kDirectoryAttrTypeBody        "aoce Directory"
  349. #define        kDirectoriesAttrTypeBody    "aoce Directories"
  350. #define        kSFlagsAttrTypeBody            "aoce SFlags"
  351. #define        kLocalNameAttrTypeBody        "aoce Local Name"
  352. #define        kLocalKeyAttrTypeBody        "aoce Local Key"
  353. #define        kDirUserRIDAttrTypeBody        "aoce Dir User RID"
  354. #define        kDirUserKeyAttrTypeBody        "aoce Dir User Key"
  355. #define        kDirNativeNameAttrTypeBody    "aoce Dir Native Name"
  356. #define        kCommentAttrTypeBody        "aoce Comment"
  357. #define        kRealNameAttrTypeBody        "aoce Real Name"
  358. #define        kPrivateDataAttrTypeBody    "aoce Private Data"
  359. #define        kDirTypeAttrTypeBody        "aoce Directory Type"
  360. #define        kDSAMFileAliasAttrTypeBody    "aoce DSAM File Alias"
  361. #define        kCanAddressToAttrTypeBody    "aoce Can Address To"
  362. #define        kDiscriminatorAttrTypeBody    "aoce Discriminator"
  363. #define        kAliasAttrTypeBody            "aoce Alias"
  364. #define        kParentMSAMAttrTypeBody        "aoce Parent MSAM"
  365. #define        kParentDSAMAttrTypeBody        "aoce Parent DSAM"
  366. #define        kSlotAttrTypeBody            "aoce Slot"
  367. #define        kAssoMailServiceAttrTypeBody "aoce Asso. Mail Service"
  368. #define        kFakeAttrTypeBody            "aoce Fake"
  369. #define        kInheritSysAdminAttrTypeBody "aoce Inherit SysAdministrators"
  370. #define        kPreferredPDAttrTypeBody    "aoce Preferred PD"
  371. #define        kLastLoginAttrTypeBody        "aoce Last Login"
  372. #define        kMailerAOMStateAttrTypeBody    "aoce Mailer AOM State"
  373. #define        kMailerSendOptionsAttrTypeBody "aoce Mailer Send Options"
  374. #define        kJoinedAttrTypeBody            "aoce Joined"
  375. #define        kUnconfiguredAttrTypeBody    "aoce Unconfigured"
  376. #define        kVersionAttrTypeBody        "aoce Version"
  377. #define        kLocationNamesAttrTypeBody    "aoce Location Names"
  378. #define        kActiveAttrTypeBody            "aoce Active"
  379. #define        kDeleteRequestedAttrTypeBody "aoce Delete Requested"
  380. #define        kGatewayTypeAttrTypeBody     "aoce Gateway Type"
  381.  
  382.  
  383.  
  384. #ifndef    REZ
  385. /* Miscellaneous enums: */
  386.  
  387. enum  {
  388.     kRString32Size            = 32,        /* max size of the body field in RString32 */
  389.     kRString64Size            = 64,        /* max size of the body field in RString64 */
  390.     kNetworkSpecMaxBytes    = 32,        /* max size of the body field in NetworkSpec */
  391.     kPathNameMaxBytes        = 1024,        /* max size of the data field in PackedPathName */
  392.     kDirectoryNameMaxBytes    = 32,        /* max size of the body field in DirectoryName */
  393.     kAttributeTypeMaxBytes    = 32,        /* max size of the body field in AttributeType */
  394.     kAttrValueMaxBytes        = 65536,    /* max size of any attribute value */
  395.     kRStringMaxBytes        = 256,        /* max size (in bytes) of the body field of a recordName or recordType */
  396.     kRStringMaxChars        = 128        /* max size (in chars) of the body field of a recordName or recordType */
  397. };
  398.  
  399. enum  {
  400.     kNULLDNodeNumber = 0,                /* Special value meaning none specified */
  401.     kRootDNodeNumber = 2                /* DNodeNum corresponding to the root of the tree */
  402. };
  403.  
  404. /*
  405. This enum is used to select the kind of RString in calls such as OCERelRString,
  406. OCEEqualRString, and OCEValidRString.
  407.  
  408. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  409. use RStrings for things other than what you see in this file.  If you want them to
  410. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  411. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  412. insensitive manner (c = C = ç), use eGenericInensitive.
  413. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  414. names, entity names, pathname parts, entity types, network specs, or attribute
  415. types!  Don't assume that you know how they should be compared!!!
  416. */
  417.  
  418. enum  {
  419.     kOCEDirName                    = 0,
  420.     kOCERecordOrDNodeName        = 1,
  421.     kOCERecordType                = 2,
  422.     kOCENetworkSpec                = 3,
  423.     kOCEAttrType                = 4,
  424.     kOCEGenericSensitive        = 5,
  425.     kOCEGenericInsensitive        = 6
  426. };
  427.  
  428. typedef unsigned short RStringKind;
  429.  
  430. /* Values for the signature field in Discriminator */
  431.  
  432. enum  {
  433.     kDirAllKinds                = 0,
  434.     kDirADAPKind                = 'adap',
  435.     kDirPersonalDirectoryKind    = 'pdir',
  436.     kDirDSAMKind                = 'dsam'
  437. };
  438.  
  439. typedef unsigned long OCEDirectoryKind;
  440.  
  441.  
  442. /* Values returned by GetDSSpecInfo() */
  443.  
  444. enum  {
  445.     kOCEInvalidDSSpec            = 0x3F3F3F3FL,
  446.     kOCEDirsRootDSSpec            = 'root',
  447.     kOCEDirectoryDSSpec            = 'dire',
  448.     kOCEDNodeDSSpec                = 'dnod',
  449.     kOCERecordDSSpec            = 'reco',
  450.     kOCEentnDSSpec                = 'entn',
  451.     kOCENOTentnDSSpec            = 'not '
  452. };
  453.  
  454. /* Values for AttributeTag */
  455.  
  456. enum  {
  457.     typeRString                    = 'rstr',
  458.     typePackedDSSpec            = 'dspc',
  459.     typeBinary                    = 'bnry'
  460. };
  461.  
  462. /*
  463. Bit flag corresponding to the canContainRecords bit.  Use it like this:
  464.     if (foo & kCanContainRecords)
  465.         then this dNode can contain records!
  466. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  467. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  468. mail routers might be able to route to clusters beneath it.
  469. */
  470.  
  471. enum  {
  472.     kCanContainRecordsBit,
  473.     kForeignNodeBit
  474. };
  475.  
  476. enum  {
  477.     kCanContainRecords            = 1L << kCanContainRecordsBit,
  478.     kForeignNode                = 1L << kForeignNodeBit
  479. };
  480.  
  481. typedef unsigned long DirNodeKind;
  482.  
  483.  
  484.  
  485.  
  486. /**** Toolbox Control ****/
  487.  
  488. /*
  489. We will have a version number and attributes for toolboxes off the aa5e trap
  490. and the S&F server trap.
  491.  
  492. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  493. change to ONLY service ServerGateway calls —it will then be necessary to run
  494. it co–resident with an OCE toolbox].
  495.  
  496. The high order word will represent the S&F Server version number.  The low
  497. order word will represent the OCE toolbox version number.  These will be zero
  498. until the component is up and running.  It is not possible to know these
  499. a–priori. Note: there will not be a seperate version numbers for each component
  500. in the OCE toolbox or S&F server.
  501.  
  502. The above is consistent with the standard System 7.0 usage of Gestalt.
  503.  
  504. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  505. machine.
  506.  
  507. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  508.  
  509. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  510. available through the S&F server. This are essentially the server gateway calls.
  511.  
  512. Any (future) remaining OCE attributes may not be established correctly until
  513. the attribute gestaltOCETBAvailable is set.
  514.  
  515. The gestalt selectors and values are listed below:
  516. */
  517.  
  518. enum {
  519.     gestaltOCEToolboxVersion    = 'ocet',    /* OCE Toolbox version */
  520.     gestaltOCEToolboxAttr        = 'oceu'    /* OCE Toolbox attributes */
  521. };
  522.  
  523. /* version includes:
  524.  *  dirtb
  525.  *  authtb
  526.  *  mailtb
  527.  *  ipmtb
  528.  *  personal catalog
  529.  *  ADSPSecure
  530.  * e.g. all interfaces dependent on the aa5e trap.
  531. */
  532. enum  {
  533.     gestaltOCETB                    = 0x0102,    /* OCE Toolbox version 1.02 */
  534.     gestaltSFServer                    = 0x0100,    /* S&F Server version 1.0 */
  535.     gestaltOCETBPresent                = 0x01,        /* OCE toolbox is present, not running */
  536.     gestaltOCETBAvailable            = 0x02,        /* OCE toolbox is running and available */
  537.     gestaltOCESFServerAvailable        = 0x04,        /* S&F Server is running and available */
  538.     gestaltOCETBNativeGlueAvailable    = 0x10        /* Native PowerPC Glue routines are availible */
  539. };
  540.  
  541. /*    Constants used for Transitions. */
  542.  
  543. enum  {
  544.     ATTransIPMStart                = 'ipms',
  545.     ATTransIPMShutdown            = 'ipmd',
  546.     ATTransDirStart                = 'dirs',
  547.     ATTransDirShutdown            = 'dird',
  548.     ATTransAuthStart            = 'auts',
  549.     ATTransAuthShutdown            = 'autd',
  550.     ATTransSFStart                = 's&fs',
  551.     ATTransSFShutdown            = 's&fd'
  552. };
  553.  
  554. /* Some definitions for time-related parameters: */
  555.  
  556. typedef unsigned long    UTCTime;        /* Interpreted as UTC seconds since 1/1/1904 */
  557. typedef long            UTCOffset;        /* seconds EAST of Greenwich */
  558.  
  559. typedef short CharacterSet;                /* This is the same as the ScriptManager script. */
  560.  
  561.  
  562. /**** RString ****/
  563.  
  564.  
  565. /*
  566. struct RString is a maximum-sized structure.  Allocate one of these and it will
  567. hold any valid RString.
  568. */
  569.  
  570. #define RStringHeader             \
  571.     CharacterSet charSet;            \
  572.     unsigned short dataLength;
  573.  
  574. #if defined(powerc) || defined (__powerc)
  575. #pragma options align=mac68k
  576. #endif
  577. struct RString {
  578.     CharacterSet                charSet;
  579.     unsigned short                dataLength;
  580.     Byte                        body[kRStringMaxBytes];        /* place for characters */
  581. };
  582. #if defined(powerc) || defined(__powerc)
  583. #pragma options align=reset
  584. #endif
  585.  
  586. typedef struct RString RString;
  587.  
  588. /* struct ProtoRString is a minimum-sized structure.  Use this for a variable-length
  589. RString. */
  590.  
  591. #if defined(powerc) || defined (__powerc)
  592. #pragma options align=mac68k
  593. #endif
  594. struct ProtoRString {
  595.     CharacterSet                charSet;
  596.     unsigned short                dataLength;
  597. };
  598. #if defined(powerc) || defined(__powerc)
  599. #pragma options align=reset
  600. #endif
  601.  
  602. typedef struct ProtoRString ProtoRString;
  603.  
  604. typedef RString *RStringPtr, **RStringHandle;
  605.  
  606. typedef ProtoRString *ProtoRStringPtr;
  607.  
  608. #if defined(powerc) || defined (__powerc)
  609. #pragma options align=mac68k
  610. #endif
  611. struct RString64 {
  612.     CharacterSet                charSet;
  613.     unsigned short                dataLength;
  614.     Byte                        body[kRString64Size];
  615. };
  616. #if defined(powerc) || defined(__powerc)
  617. #pragma options align=reset
  618. #endif
  619.  
  620. typedef struct RString64 RString64;
  621.  
  622. #if defined(powerc) || defined (__powerc)
  623. #pragma options align=mac68k
  624. #endif
  625. struct RString32 {
  626.     CharacterSet                charSet;
  627.     unsigned short                dataLength;
  628.     Byte                        body[kRString32Size];
  629. };
  630. #if defined(powerc) || defined(__powerc)
  631. #pragma options align=reset
  632. #endif
  633.  
  634. typedef struct RString32 RString32;
  635.  
  636. #ifdef    __cplusplus
  637. extern "C" {
  638. #endif
  639.  
  640. /*
  641. Standard definitions for the entity type field and attribute type
  642. have been moved to the end of the file.
  643. */
  644.  
  645.  
  646. /*
  647. Copies str1 to str2.  str2Length is the size of str2, excluding header.
  648. A memFull error will be returned if that is not as large as str1->dataLength.
  649. */
  650.  
  651. extern pascal OSErr OCECopyRString(const RString *str1, RString *str2, unsigned short str2Length)
  652.  THREEWORDINLINE(0x303C, 776, 0xAA5C);
  653.  
  654. /*    Make an RString from a C string.  If the c string is bigger than rStrLength,
  655. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  656.  
  657. extern pascal void OCECToRString(const char *cStr, CharacterSet charSet, RString *rStr, unsigned short rStrLength)
  658.  THREEWORDINLINE(0x303C, 825, 0xAA5C);
  659.  
  660. /*    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  661. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  662.  
  663. extern pascal void OCEPToRString(ConstStr255Param pStr, CharacterSet charSet, RString *rStr, unsigned short rStrLength)
  664.  THREEWORDINLINE(0x303C, 826, 0xAA5C);
  665.  
  666. /*    Make a Pascal string from an RString.  It's up to you to check the char set of
  667. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  668. length will simply be the lower byte of the RString's length).  The StringPtr that is
  669. returned will point directly into the RString (no memory will be allocated). */
  670.  
  671. extern pascal StringPtr OCERToPString(const RString *rStr)
  672.  THREEWORDINLINE(0x303C, 827, 0xAA5C);
  673.  
  674. /*    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  675. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  676. (same as for RelString). */
  677.  
  678. extern pascal short OCERelRString(const void *str1, const void *str2, RStringKind kind)
  679.  THREEWORDINLINE(0x303C, 813, 0xAA5C);
  680.  
  681. /*    Check for equality of two RStrings. Returns true if equal. */
  682.  
  683. extern pascal Boolean OCEEqualRString(const void *str1, const void *str2, RStringKind kind)
  684.  THREEWORDINLINE(0x303C, 790, 0xAA5C);
  685.  
  686. /*    Check the validity of an RString.  Returns true if the RString is valid */
  687.  
  688. extern pascal Boolean OCEValidRString(const void *str, RStringKind kind)
  689.  THREEWORDINLINE(0x303C, 824, 0xAA5C);
  690. #ifdef __cplusplus
  691. }
  692. #endif
  693.  
  694. /**** CreationID ****/
  695.  
  696. /* Fields definitions and usage are not defined */
  697.  
  698. #if defined(powerc) || defined (__powerc)
  699. #pragma options align=mac68k
  700. #endif
  701. struct CreationID {
  702.     unsigned long                source;
  703.     unsigned long                seq;
  704. };
  705. #if defined(powerc) || defined(__powerc)
  706. #pragma options align=reset
  707. #endif
  708.  
  709. typedef struct CreationID CreationID;
  710.  
  711. typedef CreationID AttributeCreationID;
  712.  
  713. #ifdef    __cplusplus
  714. extern "C" {
  715. #endif
  716.  
  717. /* Returns a pointer to a null CreationID . */
  718.  
  719. extern pascal const CreationID *OCENullCID(void)
  720.  THREEWORDINLINE(0x303C, 836, 0xAA5C);
  721.  
  722. /* Returns a pointer to a special CreationID used within the PathFinder. */
  723.  
  724. extern pascal const CreationID *OCEPathFinderCID(void)
  725.  THREEWORDINLINE(0x303C, 828, 0xAA5C);
  726.  
  727. /* Sets the CreationID to a null value. */
  728.  
  729. extern pascal void OCESetCreationIDtoNull(CreationID *cid)
  730.  THREEWORDINLINE(0x303C, 814, 0xAA5C);
  731.  
  732. /* Copies the value of cid1 to cid2. */
  733.  
  734. extern pascal void OCECopyCreationID(const CreationID *cid1, CreationID *cid2)
  735.  THREEWORDINLINE(0x303C, 768, 0xAA5C);
  736.  
  737. /* Check the equality of two CreationIDs. */
  738.  
  739. extern pascal Boolean OCEEqualCreationID(const CreationID *cid1, const CreationID *cid2)
  740.  THREEWORDINLINE(0x303C, 780, 0xAA5C);
  741. #ifdef __cplusplus
  742. }
  743. #endif
  744.  
  745.  
  746.  
  747. /**** NetworkSpec ****/
  748.  
  749. /*
  750. For the record, a NetworkSpec is an RString with a smaller maximum size.
  751. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  752. struct to contain the max length.  But it should be possible to typecast any
  753. NetworkSpec to an RString and use all the RString utilities on it.
  754. */
  755.  
  756. #if defined(powerc) || defined (__powerc)
  757. #pragma options align=mac68k
  758. #endif
  759. struct NetworkSpec {
  760.     CharacterSet                charSet;
  761.     unsigned short                dataLength;
  762.     Byte                        body[kNetworkSpecMaxBytes];    /* always fixed at the max size */
  763. };
  764. #if defined(powerc) || defined(__powerc)
  765. #pragma options align=reset
  766. #endif
  767.  
  768. typedef struct NetworkSpec NetworkSpec;
  769.  
  770. typedef NetworkSpec *NetworkSpecPtr;
  771.  
  772.  
  773. /**** PackedPathName ****/
  774.  
  775. /*
  776. struct PackedPathName is a maximum-sized structure.  Allocate one of
  777. these and it will hold any valid packed pathname.
  778. */
  779.  
  780. #define PackedPathNameHeader     \
  781.     unsigned short dataLength;        /* dataLength excludes the space for the dataLength field */
  782.  
  783. #if defined(powerc) || defined (__powerc)
  784. #pragma options align=mac68k
  785. #endif
  786. struct PackedPathName {
  787.     unsigned short                dataLength;
  788.     Byte                        data[kPathNameMaxBytes - sizeof(unsigned)];
  789. };
  790. #if defined(powerc) || defined(__powerc)
  791. #pragma options align=reset
  792. #endif
  793.  
  794. typedef struct PackedPathName PackedPathName;
  795.  
  796. /*
  797. struct ProtoPackedPathName is a minimum-sized structure.  Use this
  798. for a variable-length packed PathName.
  799. */
  800.  
  801. #if defined(powerc) || defined (__powerc)
  802. #pragma options align=mac68k
  803. #endif
  804. struct ProtoPackedPathName {
  805.     unsigned short                dataLength;
  806. /* Followed by data */
  807. };
  808. #if defined(powerc) || defined(__powerc)
  809. #pragma options align=reset
  810. #endif
  811.  
  812. typedef struct ProtoPackedPathName ProtoPackedPathName;
  813. typedef PackedPathName *PackedPathNamePtr;
  814. typedef ProtoPackedPathName *ProtoPackedPathNamePtr;
  815.  
  816. #ifdef    __cplusplus
  817. extern "C" {
  818. #endif
  819.  
  820.  
  821. /*
  822. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  823. be large enough to hold a copy of path1.  A memFull error will be returned if that
  824. is not the case.
  825. */
  826.  
  827. extern pascal OSErr OCECopyPackedPathName(const PackedPathName *path1, PackedPathName *path2, unsigned short path2Length)
  828.  THREEWORDINLINE(0x303C, 772, 0xAA5C);
  829.  
  830. /*
  831. Returns true if packed path pointer is nil, or is of zero length, or is of
  832. length 2 and nParts of zero.
  833. */
  834.  
  835. extern pascal Boolean OCEIsNullPackedPathName(const PackedPathName *path)
  836.  THREEWORDINLINE(0x303C, 797, 0xAA5C);
  837.  
  838. /*
  839. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  840. pointers into the array 'parts', which the client asserts can hold as many as
  841. 'nParts' elements. The number of parts actually found is returned.  Strings are
  842. placed in the array in order from lowest to highest.  The first pathName element
  843. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  844. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  845. WITH THE UNPACKED STRUCT AS WELL
  846. */
  847.  
  848. extern pascal unsigned short OCEUnpackPathName(const PackedPathName *path, RString *parts[], const unsigned short nParts)
  849.  THREEWORDINLINE(0x303C, 816, 0xAA5C);
  850.  
  851. /*
  852. OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
  853. PackedPathName manufactured from the array of parts.  This length
  854. includes the length of the length field of PackedPathName, so it
  855. is safe to do a NewPtr (OCEPackedPathNameSize(...)).
  856. */
  857.  
  858. extern pascal unsigned short OCEPackedPathNameSize(const RStringPtr parts[], const unsigned short nParts)
  859.  THREEWORDINLINE(0x303C, 808, 0xAA5C);
  860.  
  861. /* OCEDNodeNameCount returns the number of RStrings contained within the path. */
  862.  
  863. extern pascal unsigned short OCEDNodeNameCount(const PackedPathName *path)
  864.  THREEWORDINLINE(0x303C, 812, 0xAA5C);
  865.  
  866. /*
  867. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  868. large enough to hold the packed pathname.  A memFull error will be returned if
  869. pathLength is too small.  parts[0] should contain the deepest pathName element,
  870. and parts[nParts - 1] should contain the name of the first pathName element beneath
  871. the root.
  872. */
  873.  
  874. extern pascal OSErr OCEPackPathName(const RStringPtr parts[], const unsigned short nParts, PackedPathName *path, unsigned short pathLength)
  875.  THREEWORDINLINE(0x303C, 803, 0xAA5C);
  876.  
  877. /*
  878. Check the equality of two packed paths.
  879. */
  880.  
  881. extern pascal Boolean OCEEqualPackedPathName(const PackedPathName *path1, const PackedPathName *path2)
  882.  THREEWORDINLINE(0x303C, 785, 0xAA5C);
  883.  
  884. /*
  885. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  886. Returns true if it's ok.
  887. */
  888.  
  889. extern pascal Boolean OCEValidPackedPathName(const PackedPathName *path)
  890.  THREEWORDINLINE(0x303C, 820, 0xAA5C);
  891. #ifdef __cplusplus
  892. }
  893. #endif
  894.  
  895. /**** DirDiscriminator ****/
  896.  
  897. #if defined(powerc) || defined (__powerc)
  898. #pragma options align=mac68k
  899. #endif
  900. struct DirDiscriminator {
  901.     OCEDirectoryKind            signature;
  902.     unsigned long                misc;
  903. };
  904. #if defined(powerc) || defined(__powerc)
  905. #pragma options align=reset
  906. #endif
  907.  
  908. typedef struct DirDiscriminator DirDiscriminator;
  909.  
  910. #ifdef    __cplusplus
  911. extern "C" {
  912. #endif
  913.  
  914. /* Copies the value of disc1 to disc2. */
  915.  
  916. extern pascal void OCECopyDirDiscriminator(const DirDiscriminator *disc1, DirDiscriminator *disc2)
  917.  THREEWORDINLINE(0x303C, 769, 0xAA5C);
  918.  
  919. /* Check the equality of two DirDiscriminators. */
  920.  
  921. extern pascal Boolean OCEEqualDirDiscriminator(const DirDiscriminator *disc1, const DirDiscriminator *disc2)
  922.  THREEWORDINLINE(0x303C, 781, 0xAA5C);
  923. #ifdef __cplusplus
  924. }
  925. #endif
  926.  
  927.  
  928. /*********************************************************************************
  929.  
  930. This structure is called RLI because it really contains all the info you
  931. need to locate a record within the entire name space.  It contains four fields.
  932. The first two are the name of the catalog and a catalog discriminator.  These
  933. two fields are used to indicate to which catalog a given record belongs.  The
  934. discriminator is used to distinguish between two different catalogs that have
  935. the same name.
  936.  
  937. The other two fields in the RLI structure are used to indicate a particular
  938. catalog node within the catalog specified by the directoryName and
  939. discriminator fields.  These fields are exactly analagous to the dirID and
  940. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  941. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  942. or by a combination of the two.  The latter is called a 'partial pathname', and
  943. while it is valid in the Catalog Manager API, it is not supported by ADAP
  944. catalogs in Release 1.
  945.  
  946. Note that the path parameter does not include the catalog name, but holds
  947. the names of all the nodes on the path to the desired catalog node, starting
  948. with the catalog node and working its way up the tree.
  949.  
  950.  *********************************************************************************/
  951.  
  952.  
  953. /**** RLI ****/
  954.  
  955.  
  956. #if defined(powerc) || defined (__powerc)
  957. #pragma options align=mac68k
  958. #endif
  959. struct DirectoryName {
  960.     CharacterSet                charSet;
  961.     unsigned short                dataLength;
  962.     Byte                        body[kDirectoryNameMaxBytes];    /* space for catalog name */
  963. };
  964. #if defined(powerc) || defined(__powerc)
  965. #pragma options align=reset
  966. #endif
  967.  
  968. typedef struct DirectoryName DirectoryName;
  969. typedef DirectoryName *DirectoryNamePtr;
  970.  
  971. typedef unsigned long DNodeNum;            /* Catalog node number */
  972.  
  973. #if defined(powerc) || defined (__powerc)
  974. #pragma options align=mac68k
  975. #endif
  976. struct RLI {                            /* Record Location Info structure: */
  977.     DirectoryNamePtr    directoryName;    /* pointer to the name of the catalog root */
  978.     DirDiscriminator    discriminator;    /* used to discriminate between dup catalog names */
  979.     DNodeNum            dNodeNumber;    /* number of the node */
  980.     PackedPathNamePtr    path;            /* old-style RLI */
  981. };
  982. #if defined(powerc) || defined(__powerc)
  983. #pragma options align=reset
  984. #endif
  985.  
  986. typedef struct RLI RLI;
  987. typedef RLI *RLIPtr;
  988.  
  989. #ifdef    __cplusplus
  990. extern "C" {
  991. #endif
  992.  
  993.  
  994. /*
  995. Create a new RLI from the catalog name, discriminator, DNode number, and
  996. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  997. to it.
  998. */
  999.  
  1000. extern pascal void OCENewRLI(RLI *newRLI, const DirectoryName *dirName, DirDiscriminator *discriminator, const DNodeNum dNodeNumber, const PackedPathName *path)
  1001.  THREEWORDINLINE(0x303C, 799, 0xAA5C);
  1002.  
  1003. /*
  1004. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  1005. simply copies the pointers to the catalog name and path, wiping out any pointer
  1006. that you might have had in there.
  1007. */
  1008.  
  1009. extern pascal void OCEDuplicateRLI(const RLI *rli1, RLI *rli2)
  1010.  THREEWORDINLINE(0x303C, 779, 0xAA5C);
  1011.  
  1012. /*
  1013. Copy the contents of rli1 to rli2.  rli2 must already contain
  1014. pointers to structures large enough to hold copies of the corresponding
  1015. fields from rli1.  A memFull error will be returned if that is not the case.
  1016. So if you allocate a brand new empty destination, you must at least set up
  1017. its length fields.
  1018. */
  1019.  
  1020. extern pascal OSErr OCECopyRLI(const RLI *rli1, RLI *rli2)
  1021.  THREEWORDINLINE(0x303C, 775, 0xAA5C);
  1022.  
  1023. /*
  1024. Check the equality of two RLIs.  This will take into account differences
  1025. in the case and diacriticals of the directoryName and the PathName.
  1026. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  1027. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  1028. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  1029. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  1030. kRootDNodeNumber will be treated as equal.
  1031. */
  1032.  
  1033. extern pascal Boolean OCEEqualRLI(const RLI *rli1, const RLI *rli2)
  1034.  THREEWORDINLINE(0x303C, 789, 0xAA5C);
  1035.  
  1036. /*
  1037. Check the validity of an RLI.  This checks that the catalog name length
  1038. is within bounds, and the packed pathname (if specified) is valid.
  1039. */
  1040.  
  1041. extern pascal Boolean OCEValidRLI(const RLI *theRLI)
  1042.  THREEWORDINLINE(0x303C, 823, 0xAA5C);
  1043. #ifdef    __cplusplus
  1044. }
  1045. #endif
  1046.  
  1047. /**** PackedRLI ****/
  1048.  
  1049. /*
  1050. struct PackedRLI is a maximum-sized structure.  Allocate one of
  1051. these and it will hold any valid packed pathname.
  1052. */
  1053.  
  1054. #define PackedRLIHeader         \
  1055.     unsigned short dataLength;    /* dataLength excludes the space for the dataLength field */
  1056.  
  1057. #if defined(powerc) || defined (__powerc)
  1058. #pragma options align=mac68k
  1059. #endif
  1060. struct PackedRLI {
  1061.     unsigned short                dataLength;
  1062.     Byte                        data[(sizeof(RString) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kPathNameMaxBytes)];
  1063. };
  1064. #if defined(powerc) || defined(__powerc)
  1065. #pragma options align=reset
  1066. #endif
  1067.  
  1068. typedef struct PackedRLI PackedRLI;
  1069.  
  1070. /*
  1071. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  1072. for a variable-length packed RLI.
  1073. */
  1074.  
  1075. #if defined(powerc) || defined (__powerc)
  1076. #pragma options align=mac68k
  1077. #endif
  1078. struct ProtoPackedRLI {
  1079.     unsigned short                dataLength;
  1080. /* Followed by data */
  1081. };
  1082. #if defined(powerc) || defined(__powerc)
  1083. #pragma options align=reset
  1084. #endif
  1085.  
  1086. typedef struct ProtoPackedRLI ProtoPackedRLI;
  1087.  
  1088. typedef PackedRLI *PackedRLIPtr;
  1089.  
  1090. typedef ProtoPackedRLI *ProtoPackedRLIPtr;
  1091.  
  1092. #ifdef    __cplusplus
  1093. extern "C" {
  1094. #endif
  1095.  
  1096.  
  1097. /*
  1098. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  1099. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  1100. is not the case.
  1101. */
  1102.  
  1103. extern pascal OSErr OCECopyPackedRLI(const PackedRLI *prli1, PackedRLI *prli2, unsigned short prli2Length)
  1104.  THREEWORDINLINE(0x303C, 773, 0xAA5C);
  1105.  
  1106. /*
  1107. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  1108. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  1109. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  1110. WITH THE UNPACKED STRUCT AS WELL
  1111. */
  1112.  
  1113. extern pascal void OCEUnpackRLI(const PackedRLI *prli, RLI *theRLI)
  1114.  THREEWORDINLINE(0x303C, 817, 0xAA5C);
  1115.  
  1116. /*
  1117. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  1118. PackedRLI manufactured from an RLI.  This length
  1119. includes the length of the length field of PackedRLI, so it
  1120. is safe to do a NewPtr (OCEPackedRLISize(...)).
  1121. */
  1122.  
  1123. extern pascal unsigned short OCEPackedRLISize(const RLI *theRLI)
  1124.  THREEWORDINLINE(0x303C, 810, 0xAA5C);
  1125.  
  1126. /*
  1127. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  1128. large enough to hold the packed RLI.  A memFull error will be returned if
  1129. prliLength is too small.
  1130. */
  1131.  
  1132. extern pascal OSErr OCEPackRLI(const RLI *theRLI, PackedRLI *prli, unsigned short prliLength)
  1133.  THREEWORDINLINE(0x303C, 804, 0xAA5C);
  1134.  
  1135. /*
  1136. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  1137. PackedRLI manufactured from the parts of an RLI.  This length
  1138. includes the length of the length field of PackedRLI, so it
  1139. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  1140. */
  1141.  
  1142. extern pascal unsigned short OCEPackedRLIPartsSize(const DirectoryName *dirName, const RStringPtr parts[], const unsigned short nParts)
  1143.  THREEWORDINLINE(0x303C, 809, 0xAA5C);
  1144.  
  1145. /*
  1146. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  1147. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  1148. if prliLength is too small.
  1149. */
  1150.  
  1151. extern pascal OSErr OCEPackRLIParts(const DirectoryName *dirName, const DirDiscriminator *discriminator, const DNodeNum dNodeNumber, const RStringPtr parts[], const unsigned short nParts, PackedRLI *prli, unsigned short prliLength)
  1152.  THREEWORDINLINE(0x303C, 805, 0xAA5C);
  1153.  
  1154. /*
  1155. Check the equality of two packed prlis.
  1156. */
  1157.  
  1158. extern pascal Boolean OCEEqualPackedRLI(const PackedRLI *prli1, const PackedRLI *prli2)
  1159.  THREEWORDINLINE(0x303C, 787, 0xAA5C);
  1160.  
  1161. /*
  1162. Check the validity of a packed RLI.  This checks that the catalog name length
  1163. is within bounds, and the packed pathname (if specified) is valid.
  1164. */
  1165.  
  1166. extern pascal Boolean OCEValidPackedRLI(const PackedRLI *prli)
  1167.  THREEWORDINLINE(0x303C, 822, 0xAA5C);
  1168.  
  1169. /*
  1170. If this packed RLI describes a Personal Catalog, this call will return a pointer
  1171. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  1172. */
  1173.  
  1174. extern pascal AliasPtr OCEExtractAlias(const PackedRLI *prli)
  1175.  THREEWORDINLINE(0x303C, 792, 0xAA5C);
  1176.  
  1177. /*
  1178. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  1179. the root of all catalogs.  It is used in the CollabPack.
  1180. */
  1181.  
  1182. extern pascal const PackedRLI *OCEGetDirectoryRootPackedRLI(void)
  1183.  THREEWORDINLINE(0x303C, 838, 0xAA5C);
  1184. #ifdef __cplusplus
  1185. }
  1186. #endif
  1187.  
  1188.  
  1189. /**** LocalRecordID ****/
  1190.  
  1191. #if defined(powerc) || defined (__powerc)
  1192. #pragma options align=mac68k
  1193. #endif
  1194. struct LocalRecordID {
  1195.     CreationID                    cid;
  1196.     RStringPtr                    recordName;
  1197.     RStringPtr                    recordType;
  1198. };
  1199. #if defined(powerc) || defined(__powerc)
  1200. #pragma options align=reset
  1201. #endif
  1202.  
  1203. typedef struct LocalRecordID LocalRecordID;
  1204.  
  1205. typedef LocalRecordID *LocalRecordIDPtr;
  1206.  
  1207. #ifdef    __cplusplus
  1208. extern "C" {
  1209. #endif
  1210.  
  1211.  
  1212. /* Create a LocalRecordID from a name, type, and CreationID */
  1213.  
  1214. extern pascal void OCENewLocalRecordID(const RString *recordName, const RString *recordType, const CreationID *cid, LocalRecordID *lRID)
  1215.  THREEWORDINLINE(0x303C, 798, 0xAA5C);
  1216.  
  1217. /*
  1218. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  1219. pointers to RString structures large enough to hold copies of the corresponding
  1220. fields from lRID1.  A memFull error will be returned if that is not the case.
  1221. So if you allocate a brand new empty destination, you must at least set up
  1222. its length field.
  1223. */
  1224.  
  1225. extern pascal OSErr OCECopyLocalRecordID(const LocalRecordID *lRID1, LocalRecordID *lRID2)
  1226.  THREEWORDINLINE(0x303C, 770, 0xAA5C);
  1227.  
  1228. /*
  1229. Check the equality of two local RIDs.
  1230. */
  1231.  
  1232. extern pascal Boolean OCEEqualLocalRecordID(const LocalRecordID *lRID1, const LocalRecordID *lRID2)
  1233.  THREEWORDINLINE(0x303C, 783, 0xAA5C);
  1234. #ifdef __cplusplus
  1235. }
  1236. #endif
  1237.  
  1238.  
  1239. /**** ShortRecordID ****/
  1240.  
  1241. #if defined(powerc) || defined (__powerc)
  1242. #pragma options align=mac68k
  1243. #endif
  1244. struct ShortRecordID {
  1245.     PackedRLIPtr                rli;
  1246.     CreationID                    cid;
  1247. };
  1248. #if defined(powerc) || defined(__powerc)
  1249. #pragma options align=reset
  1250. #endif
  1251.  
  1252. typedef struct ShortRecordID ShortRecordID;
  1253.  
  1254. typedef ShortRecordID *ShortRecordIDPtr;
  1255.  
  1256. #ifdef    __cplusplus
  1257. extern "C" {
  1258. #endif
  1259.  
  1260.  
  1261. /* Create a ShortRecordID from an RLI struct and a CreationID */
  1262.  
  1263. extern pascal void OCENewShortRecordID(const PackedRLI *theRLI, const CreationID *cid, ShortRecordIDPtr sRID)
  1264.  THREEWORDINLINE(0x303C, 801, 0xAA5C);
  1265.  
  1266. /*
  1267. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  1268. pointers to structures large enough to hold copies of the corresponding
  1269. fields from sRID1.  A memFull error will be returned if that is not the case.
  1270. So if you allocate a brand new empty destination, you must at least set up
  1271. its length fields.
  1272. */
  1273.  
  1274. extern pascal OSErr OCECopyShortRecordID(const ShortRecordID *sRID1, ShortRecordID *sRID2)
  1275.  THREEWORDINLINE(0x303C, 778, 0xAA5C);
  1276.  
  1277. /*
  1278. Check the equality of two short RIDs.
  1279. */
  1280.  
  1281. extern pascal Boolean OCEEqualShortRecordID(const ShortRecordID *sRID1, const ShortRecordID *sRID2)
  1282.  THREEWORDINLINE(0x303C, 791, 0xAA5C);
  1283. #ifdef __cplusplus
  1284. }
  1285. #endif
  1286.  
  1287.  
  1288. /**** RecordID ****/
  1289.  
  1290. #if defined(powerc) || defined (__powerc)
  1291. #pragma options align=mac68k
  1292. #endif
  1293. struct RecordID {
  1294.     PackedRLIPtr                rli;    /* pointer to a packed rli structure */
  1295.     LocalRecordID                local;
  1296. };
  1297. #if defined(powerc) || defined(__powerc)
  1298. #pragma options align=reset
  1299. #endif
  1300.  
  1301. typedef struct RecordID RecordID;
  1302.  
  1303. typedef RecordID *RecordIDPtr;
  1304.  
  1305. #ifdef    __cplusplus
  1306. extern "C" {
  1307. #endif
  1308.  
  1309.  
  1310. /*    Create a RecordID from a packed RLI struct and a LocalRecordID.
  1311. This doesn't allocate any new space; the RecordID points to the same
  1312. packed RLI struct and the same name and type RStrings. */
  1313.  
  1314. extern pascal void OCENewRecordID(const PackedRLI *theRLI, const LocalRecordID *lRID, RecordID *rid)
  1315.  THREEWORDINLINE(0x303C, 800, 0xAA5C);
  1316.  
  1317. /*
  1318. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  1319. pointers to structures large enough to hold copies of the corresponding
  1320. fields from lRID1.  A memFull error will be returned if that is not the case.
  1321. So if you allocate a brand new empty destination, you must at least set up
  1322. its length fields.
  1323. */
  1324.  
  1325. extern pascal OSErr OCECopyRecordID(const RecordID *rid1, const RecordID *rid2)
  1326.  THREEWORDINLINE(0x303C, 777, 0xAA5C);
  1327.  
  1328. /*    Check the equality of two RIDs. */
  1329.  
  1330. extern pascal Boolean OCEEqualRecordID(const RecordID *rid1, const RecordID *rid2)
  1331.  THREEWORDINLINE(0x303C, 788, 0xAA5C);
  1332. #ifdef __cplusplus
  1333. }
  1334. #endif
  1335.  
  1336.  
  1337. /**** PackedRecordID ****/
  1338.  
  1339. /*
  1340. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  1341. these and it will hold any valid packed RecordID.
  1342. */
  1343.  
  1344. #define PackedRecordIDHeader     \
  1345.     unsigned short dataLength;        /* dataLength excludes the space for the dataLength field */
  1346.  
  1347. #if defined(powerc) || defined (__powerc)
  1348. #pragma options align=mac68k
  1349. #endif
  1350. struct PackedRecordID {
  1351.     unsigned short                dataLength;
  1352.     Byte                        data[(kPathNameMaxBytes + sizeof(DNodeNum) + sizeof(DirDiscriminator) + sizeof(CreationID) + (3 * sizeof(RString)))];
  1353. };
  1354. #if defined(powerc) || defined(__powerc)
  1355. #pragma options align=reset
  1356. #endif
  1357.  
  1358. typedef struct PackedRecordID PackedRecordID;
  1359.  
  1360.  
  1361. /*
  1362. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  1363. for a variable-length packed RecordID.
  1364. */
  1365.  
  1366. #if defined(powerc) || defined (__powerc)
  1367. #pragma options align=mac68k
  1368. #endif
  1369. struct ProtoPackedRecordID {
  1370.     unsigned short                dataLength;
  1371. /* Followed by data */
  1372. };
  1373. #if defined(powerc) || defined(__powerc)
  1374. #pragma options align=reset
  1375. #endif
  1376.  
  1377. typedef struct ProtoPackedRecordID ProtoPackedRecordID;
  1378.  
  1379. typedef PackedRecordID *PackedRecordIDPtr;
  1380.  
  1381. typedef ProtoPackedRecordID *ProtoPackedRecordIDPtr;
  1382.  
  1383. #ifdef    __cplusplus
  1384. extern "C" {
  1385. #endif
  1386.  
  1387.  
  1388. /*
  1389. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  1390. pointers to structures large enough to hold copies of the corresponding
  1391. fields from pRID1.  A memFull error will be returned if that is not the case.
  1392. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  1393. packed RecordID header.
  1394. */
  1395.  
  1396. extern pascal OSErr OCECopyPackedRecordID(const PackedRecordID *pRID1, const PackedRecordID *pRID2, unsigned short pRID2Length)
  1397.  THREEWORDINLINE(0x303C, 774, 0xAA5C);
  1398.  
  1399. /*
  1400. Create a RecordID from a PackedRecordID.
  1401. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1402. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  1403. */
  1404.  
  1405. extern pascal void OCEUnpackRecordID(const PackedRecordID *pRID, RecordID *rid)
  1406.  THREEWORDINLINE(0x303C, 818, 0xAA5C);
  1407.  
  1408. /*
  1409. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  1410. the packed RecordID.  A memFull error will be returned if that is not the case.
  1411. packedRecordIDLength is the number of bytes that can be put into pRID, not
  1412. counting the header.
  1413. */
  1414.  
  1415. extern pascal OSErr OCEPackRecordID(const RecordID *rid, PackedRecordID *pRID, unsigned short packedRecordIDLength)
  1416.  THREEWORDINLINE(0x303C, 806, 0xAA5C);
  1417.  
  1418. /*
  1419. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  1420. length includes the length of the length field of PackedRecordID, so it
  1421. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  1422. */
  1423.  
  1424. extern pascal unsigned short OCEPackedRecordIDSize(const RecordID *rid)
  1425.  THREEWORDINLINE(0x303C, 811, 0xAA5C);
  1426.  
  1427. /*
  1428. Check the equality of two packed RIDs.
  1429. */
  1430.  
  1431. extern pascal Boolean OCEEqualPackedRecordID(const PackedRecordID *pRID1, const PackedRecordID *pRID2)
  1432.  THREEWORDINLINE(0x303C, 786, 0xAA5C);
  1433.  
  1434. /* OCEValidPackedRecordID checks the validity of a packed record ID. */
  1435.  
  1436. extern pascal Boolean OCEValidPackedRecordID(const PackedRecordID *pRID)
  1437.  THREEWORDINLINE(0x303C, 821, 0xAA5C);
  1438. #ifdef __cplusplus
  1439. }
  1440. #endif
  1441.  
  1442.  
  1443. /**** DSSpec ****/
  1444.  
  1445. #if defined(powerc) || defined (__powerc)
  1446. #pragma options align=mac68k
  1447. #endif
  1448. struct DSSpec {
  1449.     RecordID                    *entitySpecifier;
  1450.     OSType                        extensionType;
  1451.     unsigned short                extensionSize;
  1452.     Ptr                            extensionValue;
  1453. };
  1454. #if defined(powerc) || defined(__powerc)
  1455. #pragma options align=reset
  1456. #endif
  1457.  
  1458. typedef struct DSSpec DSSpec;
  1459. typedef DSSpec *DSSpecPtr;
  1460.  
  1461. /*
  1462. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  1463. these and it will hold any valid packed RecordID, but not necessarily any additional
  1464. data.
  1465. */
  1466.  
  1467. #define PackedDSSpecHeader         \
  1468.     unsigned short         dataLength;        /* dataLength excludes the space for the dataLength field */
  1469.  
  1470. #if defined(powerc) || defined (__powerc)
  1471. #pragma options align=mac68k
  1472. #endif
  1473. struct PackedDSSpec {
  1474.     unsigned short                dataLength;
  1475.     Byte                        data[(sizeof(PackedRecordID) + sizeof(OSType) + sizeof(unsigned))];
  1476. };
  1477. #if defined(powerc) || defined(__powerc)
  1478. #pragma options align=reset
  1479. #endif
  1480.  
  1481. typedef struct PackedDSSpec PackedDSSpec;
  1482.  
  1483. /*
  1484. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  1485. for a variable-length packed DSSpec.
  1486. */
  1487.  
  1488. #if defined(powerc) || defined (__powerc)
  1489. #pragma options align=mac68k
  1490. #endif
  1491. struct ProtoPackedDSSpec {
  1492.     unsigned short                dataLength;
  1493. /* Followed by data */
  1494. };
  1495. #if defined(powerc) || defined(__powerc)
  1496. #pragma options align=reset
  1497. #endif
  1498.  
  1499. typedef struct ProtoPackedDSSpec ProtoPackedDSSpec;
  1500.  
  1501. typedef PackedDSSpec *PackedDSSpecPtr;
  1502.  
  1503. typedef ProtoPackedDSSpec *ProtoPackedDSSpecPtr;
  1504.  
  1505. #ifdef __cplusplus
  1506. extern "C" {
  1507. #endif
  1508.  
  1509.  
  1510. /*
  1511. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1512. pointers to structures large enough to hold copies of the corresponding
  1513. fields from pdss1.  A memFull error will be returned if that is not the case.
  1514. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1515. packed DSSpec header.
  1516. */
  1517.  
  1518. extern pascal OSErr OCECopyPackedDSSpec(const PackedDSSpec *pdss1, const PackedDSSpec *pdss2, unsigned short pdss2Length)
  1519.  THREEWORDINLINE(0x303C, 771, 0xAA5C);
  1520.  
  1521. /*
  1522. Create a DSSpec from a PackedDSSpec.
  1523. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1524. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1525. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1526. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1527. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1528. into dss, and set dss->entitySpecifier to rid.
  1529. */
  1530.  
  1531. extern pascal void OCEUnpackDSSpec(const PackedDSSpec *pdss, DSSpec *dss, RecordID *rid)
  1532.  THREEWORDINLINE(0x303C, 815, 0xAA5C);
  1533.  
  1534. /*
  1535. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1536. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1537. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1538. not counting the header.
  1539. */
  1540.  
  1541. extern pascal OSErr OCEPackDSSpec(const DSSpec *dss, PackedDSSpec *pdss, unsigned short pdssLength)
  1542.  THREEWORDINLINE(0x303C, 802, 0xAA5C);
  1543.  
  1544. /*
  1545. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1546. length includes the length of the length field of PackedDSSpec, so it
  1547. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1548. */
  1549.  
  1550. extern pascal unsigned short OCEPackedDSSpecSize(const DSSpec *dss)
  1551.  THREEWORDINLINE(0x303C, 807, 0xAA5C);
  1552.  
  1553. /*    Check the equality of two DSSpecs.  This compares all fields, even the
  1554. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1555. diacrit-insensitive manner. */
  1556.  
  1557. extern pascal Boolean OCEEqualDSSpec(const DSSpec *pdss1, const DSSpec *pdss2)
  1558.  THREEWORDINLINE(0x303C, 782, 0xAA5C);
  1559.  
  1560. /*    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1561. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1562. diacrit-insensitive manner. */
  1563.  
  1564. extern pascal Boolean OCEEqualPackedDSSpec(const PackedDSSpec *pdss1, const PackedDSSpec *pdss2)
  1565.  THREEWORDINLINE(0x303C, 784, 0xAA5C);
  1566.  
  1567. /*
  1568. Check the validity of a PackedDSSpec.  If extensionType is
  1569. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1570. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1571. is made on the extension.
  1572. */
  1573.  
  1574. extern pascal Boolean OCEValidPackedDSSpec(const PackedDSSpec *pdss)
  1575.  THREEWORDINLINE(0x303C, 819, 0xAA5C);
  1576.  
  1577. /*
  1578. Return info about a DSSpec.  This routine does not check validity.  If the
  1579. DSSpec has no extension, we determine whether it represents the root of all
  1580. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1581. If the DSSpec has an extension, we simply return the extension type.
  1582. */
  1583.  
  1584. extern pascal OSType OCEGetDSSpecInfo(const DSSpec *spec)
  1585.  THREEWORDINLINE(0x303C, 793, 0xAA5C);
  1586.  
  1587. /* OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. */
  1588.  
  1589. extern pascal OSType OCEGetExtensionType(const PackedDSSpec *pdss)
  1590.  THREEWORDINLINE(0x303C, 796, 0xAA5C);
  1591.  
  1592. /*
  1593. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1594. calling the DSSpecStreamer routine that you provide.
  1595. */
  1596.  
  1597. typedef pascal OSErr (*DSSpecStreamer)(void *buffer, unsigned long count, Boolean eof, long userData);
  1598.  
  1599. extern pascal OSErr OCEStreamPackedDSSpec(const DSSpec *dss, DSSpecStreamer stream, long userData, unsigned long *actualCount)
  1600.  THREEWORDINLINE(0x303C, 829, 0xAA5C);
  1601. #ifdef __cplusplus
  1602. }
  1603. #endif
  1604.  
  1605.  
  1606. /**** AttributeType ****/
  1607.  
  1608. /*
  1609. For the record, an AttributeType is an RString with a smaller maximum size.
  1610. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1611. struct to contain the max length, because I need to include it in the Attribute struct
  1612. below.  But it should be possible to typecast any AttributeType to an RString and use
  1613. all the RString utilities on it.
  1614. */
  1615.  
  1616. #if defined(powerc) || defined (__powerc)
  1617. #pragma options align=mac68k
  1618. #endif
  1619. struct AttributeType {
  1620.     CharacterSet                charSet;
  1621.     unsigned short                dataLength;
  1622.     Byte                        body[kAttributeTypeMaxBytes];    /* always fixed at the max size */
  1623. };
  1624. #if defined(powerc) || defined(__powerc)
  1625. #pragma options align=reset
  1626. #endif
  1627.  
  1628. typedef struct AttributeType AttributeType;
  1629. typedef AttributeType *AttributeTypePtr;
  1630.  
  1631. /**** AttributeValue ****/
  1632.  
  1633. typedef DescType AttributeTag;            /* same class as is used in AppleEvents */
  1634.  
  1635. #if defined(powerc) || defined (__powerc)
  1636. #pragma options align=mac68k
  1637. #endif
  1638. struct AttributeValue {
  1639.     AttributeTag                tag;
  1640.     unsigned long                dataLength;
  1641.     Ptr                            bytes;
  1642. };
  1643. #if defined(powerc) || defined(__powerc)
  1644. #pragma options align=reset
  1645. #endif
  1646.  
  1647. typedef struct AttributeValue AttributeValue;
  1648. typedef AttributeValue *AttributeValuePtr;
  1649.  
  1650. /**** Attribute ****/
  1651.  
  1652. #if defined(powerc) || defined (__powerc)
  1653. #pragma options align=mac68k
  1654. #endif
  1655. struct Attribute {
  1656.     AttributeType                attributeType;
  1657.     AttributeCreationID            cid;
  1658.     AttributeValue                value;
  1659. };
  1660. #if defined(powerc) || defined(__powerc)
  1661. #pragma options align=reset
  1662. #endif
  1663.  
  1664. typedef struct Attribute Attribute;
  1665. typedef Attribute *AttributePtr;
  1666.  
  1667. #ifdef __cplusplus
  1668. extern "C" {
  1669. #endif
  1670.  
  1671. extern pascal RString *OCEGetIndRecordType(const OCERecordTypeIndex stringIndex)
  1672.  THREEWORDINLINE(0x303C, 795, 0xAA5C);
  1673. extern pascal AttributeType *OCEGetIndAttributeType(const OCEAttributeTypeIndex stringIndex)
  1674.  THREEWORDINLINE(0x303C, 794, 0xAA5C);
  1675. #ifdef __cplusplus
  1676. }
  1677. #endif
  1678.  
  1679. #define _oceTBDispatch 0xAA5E
  1680.  
  1681. #endif
  1682.  
  1683. #endif
  1684.  
  1685.